From: Joan Torres López Date: Wed, 11 Jun 2025 15:46:07 +0000 (+0200) Subject: loginDialog: Don't reconnect on each reset with gdmClient X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~124^2^2~46 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=56ea95f2;p=gnome-shell.git loginDialog: Don't reconnect on each reset with gdmClient When resetting the greeter proxy, it's destroyed and then recreated again. This destroy/recreate thing doesn't give any info to GDM and the greeter interface destroyed has the same state as the newly created one. Each time get_greeter_sync is called when greeter is destroyed makes GDM create a new connection which stores in a list. This means that for each reset a new unnecessary connection is created and stored. GDM was leaking some objects which combined with this excessive connection creation was causing a fd leak on each reset. To make better use of resources and avoid problems, use ensure instead of reset greeter proxy. Part-of: --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 44dad333f..15ba43a35 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -990,10 +990,10 @@ export const LoginDialog = GObject.registerClass({ this._showPrompt(); } - _resetGreeterProxy() { + _ensureGreeterProxy() { if (GLib.getenv('GDM_GREETER_TEST') !== '1') { if (this._greeter) - this._greeter.run_dispose(); + return; this._greeter = this._gdmClient.get_greeter_sync(null); @@ -1005,7 +1005,7 @@ export const LoginDialog = GObject.registerClass({ } _onReset(authPrompt, beginRequest) { - this._resetGreeterProxy(); + this._ensureGreeterProxy(); this._sessionMenuButton.updateSensitivity(true); const previousUser = this._user;